<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/6/1 0001
 * Time: 上午 10:33
 */
namespace app\admin\controller;

class Validate{
    public static function checkmoney($value){
        if($value<=0){
            return false;
        }
        if (preg_match('/^[0-9]+(.[0-9]{1,2})?$/', $value)) {
            return true;
        }else{
            return false;
        }
    }
    public static function checkPackingcharge($value){
        if($value<0){
            return false;
        }
        if (preg_match('/^[0-9]+(.[0-9]{1,2})?$/', $value)) {
            return true;
        }else{
            return false;
        }
    }
}